Refactor, add lower level interfaces.