Fixed error in GetResource that was indexing by password instead of
name in the returned lock data.
Some cleanup, plus creating a wish list of RM unit tests to carry out.