Implement Put and some minor style fixes