Incorporate changes suggested by @sigmavirus24