Fixed error when adding first dependency.
Refactored and outline

Refactored a bit and created outline for different package aspects. The
structure is becoming more clear now and I think it will be quite
flexible.