Some code cleanup, more examples