New version with working registration.