Updated tests & fixed bugs and typos