redesign, better for safari, clean up code