Refactored to remove dependencies and work with chef-11