introduced component registry and moved traits into separate files