Fix #1435

- Fixed issue with out/ref parameters
- Fixed issue when there is no namespace on the class.