Latest commit with logic half-way done.