This is a rolled up commit of all the changes to get the back-end
working