Another refactoring and merge with Modela