Working on fixing bugs and tests