Lots of changes in order to make app runnable.