cleaned up code and applied pcl style guide