Refactor groups into separate file, improved.
Use #pragma once directives instead of #ifndef's
Fixed warning about friend class