fixed various bugs, added LICENSE and packag.json to project