Added more inline documentation / comments.