Recursion fix and some style modifications