added tests and refactored maven ns