wired up backend + more unit tests + fixes