Context aware mobile applications are special types of context aware network systems that process gathered data from environment with context cycle functionalities and special infrastructure to obtain context information. Here, modelling and reasoning are most important functionalities and middleware is one of the common infrastructure to implement these functionalities. Essentially, techniques that are used in these modelling and reasoning processes should have flexible, well-structured, fast features as well as robust quality checking mechanisms. With these motivations, in this paper, we propose our context aware mobile application management system infrastructure with an exemplary smart workplace scenario implementation. In this system, we use our new middleware to implement context cycle functionalities such as acquisition, modelling, reasoning, distribution and extra features. Also, we propose priority based binary context tree approach to enable extendable, fast and well-structured modelling technique. To enable priority feature of tree, priority expression and stack data structure are used and all context attributes represented with binary values on the tree. Besides all these, to support our modelling technique, we provide new formal language with alphabets, grammar rules and words for formal based logic rule reasoning approach. Moreover these features, our proposed middleware enable context history keeping functionality. Using these informations with simple implementations, we show our modelling approach has % 12 better time performance and our system has % 50 higher performance value in terms of connected devices.