Changed indices in engine to size_t for larger problems.
Rcpp::wrap(size_t) appears to crash Windows machines; reverting to int until solution arrives.
Removed more compiler warnings on Windows system.