First steps to simplify the source code (refactoring effort)