I'll work on this little later and ping you for review @peterflynn 

Do you think it'd be better to pass some kind of `state` object between functions or is there a cleaner solution when passing around too many variables?