Removes debug code and adds commets