Seperated CLI tool and library functions.