bit of cleanup and more seperation of stuff