Resolves issue #1 and also removes main_running from main.c