reimplement NewFromBytes
minor cleanups