Removed some unused parameters and fixed a couple -W warnings