Finished with groups.
Fixed several bugs.