Refactored, re-did some stuff.