case 2622 - Move some code to .module file.