Minor cleanup of x64 code, moved output functionality to seperate file.