Simplify api

As suggested by @frodsan.