Changed to struct, cleanign code, fast code