Incorporated patrick's suggestions and fixed the scalastyle build.