Simple fixed to allow scalar types to be returned from functions
Fixed conflicts
Simplified type mapping