More refactoring

1st one simple source
More refactoring

2nd, the other refactored source