refactoring persona-common so it can apply to app and mysql