source files for the app. (please excuse code quality)