xml background feature added

+ code cleaned up