Cleanup shader stuff; a bit of refactoring