Make major refactoring toward object-orientation