  Let X be a Gorenstein normal 3-fold satisfying (ELF) with local rings which
are at worst isolated hypersurface (e.g. terminal) singularities. By using the
singular derived category D_{sg}(X) and its idempotent completion, we give
necessary and sufficient categorical conditions for X to be Q-factorial and
complete locally Q-factorial respectively. We then relate this information to
maximal modification algebras(=MMAs), introduced in [IW10], by showing that if
an algebra A is derived equivalent to X as above, then X is Q-factorial if and
only if A is an MMA. Thus all rings derived equivalent to Q-factorial
terminalizations in dimension three are MMAs. As an application, we extend some
of the algebraic results in Burban-Iyama-Keller-Reiten [BIKR] and Dao-Huneke
[DH] using geometric arguments.
