Updated API

Resolved #30