Fixed checkstyle violations.
Also added better functions
Fixed checkstyle violation