Added initial state search code.