Added a type system, cleaned up parser.