Fixed a number of deprecated function calls
Fixed duplicate definition compile errors
Merge pull request #230 from bitshifter/dupdef

Warning and error fixes