Refactor: cleaned bubble code