Save background colour and code refactoring