Split the main function up into parts in a new file, and cleaned up the touchscreen api in th process. Also got rid if an unnecessary gitignore file.