Dependencies

NPE while first start
Refactoring part one