Minor refactoring, app still crash