Move out the repetitive functions from loss_calculator and the damage_calculator
For example creation and filling of the ground-motion table is done exactly the same way in both files. So It would make sense to move out the repetitive parts into another file and just call them.