Started some typecheck implementation