Lots of changes:

- Changed indentation to spaces instead of tabs
- Refactored damage functions to flow better