cleanup - static methods where possible
try-with-resource refactoring (Java7)
refactoring - static method where possible
cleanup