Fixing many small issues