Switched to map for storing links; Additional minor changes;