Fix some errors, not quite there yet