Added reading from a byte array + even more improvements