Ignore out-of-group units.
Inspect unit if needed.
Removed some debug statements.
Whitespaces cleanup.