Copied Main.cpp from Longboat