Use try-with-resources syntax where possible; some small changes
Eclipse settings