Removed redundancy logs and do refactor coding