Added HasSource class
Typecheck everything except assignments & function calls