Cleaned up recurse method, eliminated unused vars, easier to read