Added support for return type parsing
Fixing various bugs