Started porting tests from BitcoinJ
Minor changes