#273 Refactoring complete

Please review and let me know if there is more to be completed here.

Bitcoin address: 112LnfRzmA6AMU5i6SHPCGpjM3Ya5pBVLb