Support for x86_64 and i386

I have simplified a lot of code and added support for x86_64.