Merge "Make isPowerPluggedIn a method for flexibility." into main