DRY up code, application_prefix default to empty