Maximizing and minimizing now works in principle

Has only been tested on SAS, but should also work on CAS. Reloading
everything is still very slow, and camera + matrices have to be
recalced.