Added max search depth, static deadlock check