Extend resource registration to all file types. Code format fixes