Total rework, see README.md