Fix microformats to work properly in Chrome and Firefox

The microformats weren't working properly with either the Chrome or Firefox parsers, so I fixed them. I also added tests and refactored the code a bit. More improvements coming!