Type fixes and prefetching for Visual Studio
Added some const