massive refractor. persistence added. keycode changes, etc..