added group functions.
config edited for security.
building event functions
added List of Events.
added db->insert_id return values
made redirects optional
started sort funcs by name
adjusted to style guide guidelines
style changes / line endings