DEBUG - still not complete.

DEBUG of stupid mistakes and whatnot. Still not done though...