Updated to class based, added extra replacement option