More tests. Remove unused usings. Bug fixes