Refactoring and cleanup

- Updated subroutine uniforms.
- Work-in-progress, some parts will not compile.