Restructure for both client/server support and first version of new backend for localstorage