Added plane class and a couple of functions