Implmented and tested frontier computation.