comments updated, removed global stuff