Bmclib class refactor

Hi! I think this module is cool and I would like to help improve it.

I couldn't run the tests at first because they seemed to be incompatible with my version of Ruby/Puppet.

I'm still pretty new to the testing thing myself, but if you think this is good, I would like to do more.