Fixed a few warnings

Fixed a number of warnings, mostly related to signed/unsigned conversions
One was actually an error, due to the change of hwaddr from a string to
an object.