fix fundamentals flaws in acceptance tests, added more unit tests