Refactored everything to look nicer, renamed things, ready for archives