Code cleanup
Updated examples