fixed the getElements function in apiQueries so it could be called properly
cleaned up the remaining functions in apiQueries
metricType dropdown now works