Updated SGLResourceMapper generation class

Fixed an error and made the code more simple
Added code generation for final server classes
Minor fixes