Fix build and sort warnings out