Reformatted code + Wmi improvements