Fixed hopefully all my mistakes