Refactoring code recently added