Make functions and global state static

None of these are required anywhere else.
Make functions static

None of these are required anywhere else.
Make functions static

None of these are required anywhere else.
Output position after each line in verbose mode