Add lookup functionality and a reference lookup method

Never assume that anything will be easy...