Few more tweaks, should run with fewer errors now.