This options handling is way nicer than how I was doing it