Refactored parts of the project and updated the library