meta: Some refactoring + shader caching + minor fixes