Added new tests, updated dependencies, refactored a bit.