Fixing tests and adding stubs