Fixed the fact that tests dont work and added a complete test suite