split up js a bit, added ability constructor/dictionary