Added custom application, moves shared preferences to application and
added moving to last opened page in diary on reopen.