Fixed visability scopes, moved tests to separate package