more refactoring
more refactoring fun, seems to be building correctly again