little bit of refactoring
continued extracting code into separate files
+caching of uniform locations