Adding some documentation to the main script.
lib: Added documentation.