Better output and renamed some vars