Small refactoring, still doesn't save to the database