More revisions to finally get it working at a basic level