Finallize reorganization. Succesfully tested in emulator.