Added boilerplate code. Buffer sizes aren't correct so there is some clicking, but that shouldn't take long to fix.