Cleaned up version checking again. I think this is better.