Clean up code + added persistence for users