Refactored tokeniser and added token.print functionality.