Add some documentation and improve examples