refactoring, madman ai