Added a capability to specify a foreign key.
Renamed and fixed listFiles().