added plane math, implemented generic camera functions and other minor stuff