Initial commit of stripped down code from 'forchrome'.