Commit 22

Who would've thought getting the AI to improve planets would be this
hard... not I! Also some debugging + condensing scripts.