Removing debug code, cleaning up description, improving comments etc.