Improved error handling
Renamed file for value types
Improved error messages
Fixed method signature for java-compatibility
cleanup