switched to uuids, cleanup and minor fixes