Refactor down to 2 source files