Refactors to work with SBT