cleaning up and starting from scratch taking the environment from a similar project, feel like the solution can be improved by using a different syntax and HTML5 canvas API