Changed gemini.py to make it more readable, relieable and easier to use