Clean up old methods, format long lines

Added back the line index. We'll need it later.
Simplify blob loading logic
Clean up ported code