fixed a lot of minor errors