Initial revision
Martin Hedenfalk <martin@bzero.se> Josh Myer <josh@joshisanerd.com> fixed a buffer-checking FIXME