refactoring, test and exe support