organized functions, renamed some stuff
Put node splitting in main parse func instead of individual handlers