Added some documentation and convenience functions