More refactoring of the code application. This should make it logically easy to find where everything belongs.