Forked from https://github.com/amaunz/Pol.
Refactored as maven project, introduced several performance improvements.