moved struct declarations to new header files, some refactoring and changes to method logic
freed token at end of read_token() method