Added queryLinks and queryActions methods. Minor fixes