added app ID, query generator

Added APP ID and a function that returns a complete query path.