Improve code

See the resolved issues https://github.com/Progether/JAdventure/issues?q=is%3Aissue+is%3Aclosed