Modernized methods and added 64 bit support.