Added a bit of documentation, removed most of the debug statements, kept warnings.