Simplifiy registration of views. add registration of modes