552 master pr

Closes #552, closes #453, fixes #426 . 

@davefp Here's big PR for all my work. I found it easier to do it like that, rather than rebasing old commits for nothing. It'll keep master's log pretty. All tests are obv passing. I'm not sure about what should we do with heroku, so I commited it separately. Waiting for your feedback. Have fun reviewing. Cheers!