Need to merge with main.cpp update.