Output changes + recursion cleanup

Removed all recursion and created new output