Resources system fix
Typeof
Comments
minor formatting tidy up
Merge branch 'resources'