Add ability to switching to specified group.
Fix local variable is not initialized.
Enable compiler warnings.