significant changes; more unit tests, single methods, better docs