Fixed error in index. Added some testing code there. Made Base echo query in getForeignModels for testing purposes.