Branes: From free fields to general backgrounds