Done, need to refactor.  Needs a really thorough cleaning