Refactoring.
Added new handlers.