Tests written, code altered to adjust for failures