API rc1

Add API documentation.
Repair wrong package.json main pointing file.
Repair false error message when copying files.
Add comments in API code section.