Code formatting
Fix generics warning
Extend KeyAdapter in private class and not KeyListener -> less code
add encoding information handling for data file