Cleaned up ID parsing.