Shuffled some variables around, increased buffer size so demo works on
my Nexus 5.