Fix many small issues