cleanup operator code in types.rb
change inspect format of objects
redesign error handling