Wrote tests & fixed existing tests