Updated after review of @webmozart