Move register and unregister calls to onCreate() and onDestroy()