Commands and some util improvements