Changes constructor for receiver, and minor changes on other code