Initial quick fixes

Relatively minor changes to just get the core functionality working for subsequent development