Improve documentation, added extend example.