refactoring and comments
edited readme, refactored Debug function