Fixed bugs, Added Documentation.