Main app-loop fn kind of working now.