Made library alterations and added docs