Added caption script and made necessary changes