Fixed some stuff:
- Writing length shorts
- OutputStream fixes