Refactoring the code. Add new features.