Some minor changes

Change order of functions
Remove writeByte function (commented) - don't need yet