Refactored based on the latest update (commit #232) on SVN: svn://svn.bukkit.org/minecraft/transporter/mainline/trunk