Refactoring into new updategroup function.
Added updateroom to add/update rooms in DB.
Bugfix: No longer gives error and fails if DB is empty (the first time, then it would work).