refactored ce_customtools, global variable put off the less and less "main" form