cleaned up, old vars commented etc