Extract parselets into functions
Some tidying