Added / renamed resource type constants.
Improved the code file factory methods.
Added a switch to enable/disable caching on a code file directly.