Refactored behaviour registration and creation.