Moved files around and fixed unit tests