day 1
Added factories & refactored messy code