Initialize app properly.