Added toFront and toBack functions, improved stability for selected objects.
Added a more robust save feature making it possible to make a 'toFront' and 'toBack' function.