Update .gitignore
Overhaul: manual token parsing, split up functions