<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse(self, data):
 """ Split and iterate through the datafile to extract genres, tags and points. """


        categories = data.split("\n\n")
        reference = {}
        reference_points = {}
        genre_index = []
        tag_index = []

        for category in categories:
            entries = category.strip().split("\n")
            entry_category, entry_points = self._parse_entry(entries[0].lower())

            if entry_category.startswith("#"):
                continue

            for entry in entries:
                entry = entry.lower()
                if not entry:
                    continue

                # Comment, ignore
                if entry.startswith("#"):
                    continue

                # Handle genre
                if not entry.startswith("-"):
                    genre, points = self._parse_entry(entry)

                    reference[genre] = entry_category
                    reference_points[genre] = points
                    genre_index.append(genre)

                # Handle tag
                else:
                    tag = entry[1:]
                    tag, points = self._parse_entry(tag, limit=9.5)

                    reference[tag] = entry_category
                    reference_points[tag] = points
                    tag_index.append(tag)

        self.reference = reference
        self.genres = genre_index
        self.tags = tag_index
        self.points = reference_points