Cleaned some code and changed resizing on write