Cleaned up add vertex code.'