Working on type checking
Fixed merge conflicts