Made tests more modular. Prepare for rewrite