Add method for setting background

This PR adds support for setting background via the API.

Targets #438