Added tests. Extracted tap parsing bits into their own js file. Removed unneeded dependencies.