Refactor to support SBT.