Wip/rebase/receiver read write refactor

Rebase #19 to include new gradle stuff.