Reimplemented iterative deepening

Previous iterative deepening search was incorrect, now works correctly