Now shows outline preview of magic window before clicking
Fixed bug where controls would still work when the window was out of focus
StateManager uses unique_ptr and provides a makeUnique function, so no need to call "new"
StateManager and related classes have been simplified and made more robust