Parser

 - Added tests.
 - Replaced regex spagetti with [an algorithm provided here](http://stackoverflow.com/a/27167940/1420197).
 - Changed the format of objects.
 - Fixed #2.
 - Fixed #1.