Finished initial (un-debugged) version of damage module)