Added scalastyle and configured it
Made Both private and eliminated test

I had to reorder the sequence of checks in upperBound to get 100% test
coverage despite not having a direct test
Added final newline to make scalastyle happy
Made foreachInterval private