more meaningful comments on the pl file; converted couple more functions