Fix bugs found by testing; change tests where necessary; add tests for axis