Refact. Fix errors.