Added WriteAt() methods and fixed unnecessarily large allocation