Refactoring Main/Attack