Started: importing code from okdoki repo.