Added documentation and more user-friendly function names