changed TypeChecker and moved some code to storage temp