Added some documentation and removed a debug message