Taes 11/10 code merged, only error handling not implemented in registration and logging