Working now, all tests pass, broken into multiple files.