Studying dark matter with MadDM: lines and loops