A little clean-up an dstreamlining of API