Fixed many small issues