Cleaned up some validation