Refractor of many of the functions to replace **kargs with a dictionary
so it is a cleaner design.
Fixed one of the warning messages which was showing up when it shouldn't
and made it more descriptive.