Code cleanup and bug fixes

addresses https://github.com/OpenBazaar/OpenBazaar/issues/282 https://github.com/OpenBazaar/OpenBazaar/issues/322 and a few similar issues
I agree, but wanted to minimize changes until I know how to proceed re: https://github.com/OpenBazaar/OpenBazaar/issues/180