Code formatting
Fix ReferenceError during displayResults

Also add test