Restructure application framework