Restructured API

The API now consists of three semantically independent parts: configuration, definition and coding.