Make testable and add tests

Hi, I've created a branch where I've merged all the work form Jimdo/bowser@981354333eac73af53fd0e7746f0823502c05ec4 and Jimdo/bowser@8668678f8a226c4d3c457570c4a0ef99f93158cd and added a few more detections. For all the new detections, I've introduced tests. I'm not sure if this is of any value for you but you can merge it if you want. I will propose the same to ded/bowser but it seems that he's not in a hurry to merge your changes so I don't expect him to merge the ones I've introduced.