added testing, more dependency injection, CI