Added write optimizations and updated docs