Refactored code
Fix some examples