Improve zelda code for java project