state machine and resolution fixes

added state machine
added state interface
canvas will now be the right resolution