Setup app when a new app is created vs when it's run.
Fixed bug where if the callback isn't a function, the logic will continue.