Moved code around, preliminary steps

This is a code restructuring to give an init -> setup, calculate, teardown structure to the program. Also removes an unnecessary forward declaration.
Adding beginning of token linked list