Well I suck at php scripting but I do have some ideas. I'll help out with this as much as possible.
Idea number one: Lunar resource collector. A powerful tractor beam that pulls debris from the orbit of your planet and moon down to the surface of your moon. The collector can collect 10k metal and 10k crystal per level every 5 minutes. (or an adjustable time limit) The collector will only collect as much as your storage facilities on your moon will hold. required tech: computer tech 20, Energy tech 20, Lunar base, robotics facility 5, Sensor phalanx 1, iron storage 1, Crystal storage 1.
Gives the moons more to do. Plus its something that could logically be done on a moon considering the lower gravity. It also gives people the chance to get back some of the DF when they get attacked.