Fixed many errors. Test at once