Arrange API DSL methods;

These are sorted into groups. The indentation being an indicator of where that method is supposed to be used.
Registrar now validates attributes.
Move methods to correct class.
Minor refactoring.