added main layout and loading actions