Added more function documentation