.h functions and comments added as well as description and legal