Added correct reange indexing of the encoded sig, added recursive call for function extraction to extract all needed js functions