Finished (for now) writing source code generation for resources