Added a lot of documentation and examples