Copied essentials from 'pulse'.