Refactored magnifier into classes