Updated group.js and restructured lib.js

Added functions regarding deletion of members and collisions in the
group.
Divided the library into different functions with appropriate
documentation.