Added script to run when building.
Implemented AppState as singleton with sharedInstance, SelectionViewController now sets active profile in AppState