Feature/api

This branch is very much out of sync with master, yet it has complete and functional search API and  apitracker capabilities. Merge carefully.