Fixing template bug on Linux, removing leftover debug code in main