Added registration and logging