Implemented interpreter functionality for task 1
Extended type checking