Adding the real class, fully tested.