Got all the recursive things working with errors.
Cleaned up slightly.