added xApp abstract class
this functions as both main and app classes merged to simplify things