Fix compiler warnings & other beautification