Initial code extracted from work.com.