Implement compare, and fix timer issue.