Source model code extracted to separate sub modules to fix high overall complexity