fixes for tests, optimized build flow and removing clutter.