Updated translator so that methods are static. Added error object so that JSON serialization works for errors too.