Added some background edit functionality and a mode enum.