Separate drawing of background and foreground