Main functionality complete.