Implement zoom

This also cleans up the graphics code considerably