fixed some minor mistakes after refactoring and organizing into packages