#39 begin refactoring.