Started work on main functionality.