Moved common functions to root folder