Refactored my DBC-Phase2 final project