my coumputer went crazy. also small cleanup in gui code - added buildingDialog angulars' directive