Fixes typos: Matias's suggestions. Added more tests