Made changes to eliminate errors regarding unused variables;
changed some old functions with C++11 equivilants;

Signed-off-by: jonathan <jonathancw@me.com>