Major fixes to get everything working again