Fixed compilation error by specifying namespace std, remove unused vars