Enhanced AliasListener.java but still rather confused with it