Code refactored for Mordor.html