Server repopulating

Reworked code to allow for proper repopulating, including checkgroups. This fixes #67 .