Cleaned up fetch, adjusted main to function accordingly