Changed var names and adjusted some output