added istoken() helper function
paula: renamed file generation methods
paula: added dict to store file names
minor: moved method
paula: added hierarchy file generation