G3 is not a very impressive phone, its UI lags, not very impressive battery timings, keyboard not popping up at lockscreen, overheating sometimes on continuous usage especially on 3G (which makes the device laggy and dims the brightness). G2 was better IMHO.
Phone switching off itself could be due to malfunctioning hardware too, like battery issues, severe overheating may turn off the phone to prevent damage etc, though that's rare worst case scenarios.
But it could be software related bugs too.
Factory resetting device before and after Kitkat to Lollipop update is what I have found to be a great way to get rid of many annoying issues in most phones.