Updated dependencies
Added regression tests, removed dead code