Module & Application refactoring

Refactored Module and Application after discussion with @slavcodev.

Main idea is to remove `instanceof Application` from `Module` so parent will not be dependent on child anymore.