a bunch of bug fixes, including one to // so that direct children can be matched