More preparation for 64bit

Converted more stuff to stl