Updated groups functionality.
+ Other small changes and fixes.