Fix undefined var
move unit tests into repo using fake adapter
remove unnecessary code
update deps