Ready for production

Removed debug code, documented the source (a little bit).