Code used to demonstrate functionality on blog.mdavies.net