Testing and fixing bugs (pending more fixes)