some minor code cleanup
added link to demo