finished moving parse functions; extracted to_string from tokens; formatting fixes