Defined basic API.

Closes #1