Added frontier predicate. Fixed compilation.