Restructured serial chains for significant performance improvements
Added more test cases