Fixed type errors (typos in types)
Fixed reference to variable before first assignment
Completed stubs for complex