REFACTORING: Fixed lint issues and broken test as well as some code style for the pull.