Merged Begin/End Example to one function

Removes the possibility of the illegal state that EndExample is called when
BeginExample has not.