Move some Functions to ConnectinManager.java