Density Grid change

Switched from using Sets to LinkedLists to make it easier (?) to
retrieve the info. Also made it so that the number of dimensions changes
dynamically.