Separated files, added menu system, bug fixes