Fixed typos and errors found. Tests passing now