Fixing some DRY issues