IDs changed from string to long. Some bugs fixed.