Changed file structure and rewrote most of the old tests to work with the new implementation