Replaced NSLogs with printfs.