Started to work on the functions for changing the app-mode.