Refactor into cleaner interface