some cleanup
cleanups
basic cleanups
pulled out metagui input handling
got rid of some redundant state and replaced it with a function