Added route GET /api/application?{?apiKey}
Added tests for route GET /api/application?{?apiKey}
Using exists() instead of count() to determine if any rows exist for the current query
Remove unecessary code