Add a magnet link parser

I fixed few bugs also.