Fixed several small buffer bugs.
Working live HLS.
Removed rather excessive debugging output.