Fixed deprecated warnings, auto formatted file