Refactor

- Refactor code, fixing #7.
- Refactor tests, fixing #1 & #2.
- Add documentation, fixing #5.
- Add benchmarks, fixing #3.