The code passes some initial testing now