added facade and fixed some bugs