refactoring writes and argument order change

- refactored the writing and moving into writeAndMove for unsafe
  writes

- refactored the adding of bounds to the withBound function

- changed the order of arguments in write bytes. Now it takes the byte
  to write as the first argument.