First working version of spectral lines (DM lines not tested yet)