Added more documentation/comments