Removed unneeded dependency from Boost.Math
Fixed unused variable and redeclaration warnings.