Added unit tests and removed optional dependencies