fairly chunky refactor of the parsing/formatting/isomorphism code for consistency and clarity. also stringbuilding for better performance...