Programming main API, dirty and unfinished.