added index.js as the package main
fixed implied relation bug
added preliminary documentation