Global refactor
Updated example