Removed dead code, added Unroll function