Added more documentation, revised