Rework of API, not compatible with previous 0.0.xx versions.