Added functions and location support