added layout and database connectivity.