Complete overhaul, better documentation and easier implementation.