Some changes to persistence and added changes to handle incoming requests