tidied up the old stuff and made it work in development again