Few more code refactoring