Some global vars removed, way to go...