added docs and fixed some stuff