Moved sword logic to subdir.
Refactoring and cleanup.