Using pointer storage and making 'beg' and 'end' as methods to avoid compiler-dependent behavior (and segfault)
Cleaning example and updating