Business Logic Controller for Validating Address in Commerce
You can move it all into a Service and then call it from your main plugin file if you find it is getting unwieldy.

file: craft/plugins/businesslogic/BusinessLogicPlugin.php:
    

class BusinessLogicPlugin extends BasePlugin
{
    public function init()
    {
        craft()-&gt;on('commerce_addresses.onBeforeSaveAddress', function(Event $event)
        {
            craft()-&gt;businessLogic_events-&gt;onBeforeSaveAddress($event);
        });
    }
}


file: craft/plugins/businesslogic/services/BusinessLogic_EventsService.php:
    

class BusinessLogic_EventsService extends BaseApplicationComponent
{
    public function onBeforeSaveAddress(Event $event)
    {
        $address = $event-&gt;params['address'];

        if (empty($address-&gt;firstName))
        {
            $address-&gt;addError('firstName', Craft::t('Please enter your Name'));
            $event-&gt;performAction = false;

            // ...
        }
    }
}


Because $event is an object it will be passed by reference, and you don't need to return anything.