Simplify the API

I want to suggest some refactoring to simplify the developer's API.