Add stub for registering and do some cleanup