Refactoring of model's layers

Ref #14