Refactors runtime. Moves editor scripts to own files.