second pass at refactoring canvas code. combined touch and mouse event handlers into one. combined seperate functions for devices and made device coords function.