Working code and test page.