Moved byte stuff to another class

Now that the handling of bytes is clear, I've abstracted it into some
extension methods