remove debug, refactoring and readme updated