clean up the magnet class a bit