Renamed api.py to metservice.py

Also renamed a function