added some code from pcl.zip

mostly added intermediate and backend stuff. still gotta tweak it to
work with our code