Small refactor.
More fixes for #28.