Moved background logic to own file, updated formatting, added context menu items