Added scalastyle plugin and altered the code according to its recommendations.