Initial work on main.