Refactored to add some constants and to clean a little solstice.py