fixed additional problem with customer#favoritemerchant
cleaned invoice class
refactoring to split long methods into shorter ones