massive refactoring
tidied constants, tidied dataflow
fixed button visibility
refactoring and new features