Refactoring

Make it easy to maintain.