Replaced screenshot API and improved style