Clean up the repository, add dependencies, fix tests