fixes #2 and updated some legacy cruft