added beginnings of backend and a few tweaks