Added explicit time limit and uncommented graph search.