More documentation and less debug output