Everything works now, albeit without error checking.