Basic execution flow working, with inconsistencies in the results
Correct results in the body, memory leaks fixed