Code documentation and patches several issues found in front end API