Updated docs and fixed some issues