Refactors and pylint warning fixed
merge