Master merged into dev (changes to building queries)