Added some chater 4 bits and refactored the app helper