Implemented register handler

Issue #43