Fixed tests and added missing function
Added test, small refactorings
Added default namespace for repl