Fixes #34 ...or close enough. Couldn't get AJAX to work, so I did things the hard way.