Refactor: move alert code from main to alert.cpp/h

set new PubKey