Finished and partially tested typecheck expression
Also changed temporary testing code