Fix 'lint' target.
Add 'loc' target.
Split type-related functions into manageable chunks.
Inline some parsers to reduce noise.