Remove "s3_enabled" key and clean up the code