Added increaseChains to find all chains, cleaned code.