Some refactoring to make code cleaner