Clean up a bit, next task is making this all more OO