Added registering logic
Added init logic