Added last version of loop function with text input and current loop highlighting.
Update API documentation