Refactored and cleaned examples