removed memory leaks & added removeAllAliases method