added testing script, added logging features, stopped search from breaking, but not entirely working yet.