Refactor a bit, make API more flexible.