Renamed asClass to as to make a smoother code possible.