Some cleanup to resolve warnings and formatting in NetBeans.

Some cleanup to resolve warnings and formatting in NetBeans in device package.