refactored foreground and background paint, started new structure for buttons()