Tested with IDA 6 (should work in 5.5+, but differences in IDApython API are
possible, if you run into problems drop me a mail).
Mayor difference between previous release is bug fixes and switching to NASM
for assembling.
NOTE: you have to install NASM to use it and it should be located in
C:\Program Files\nasm\nasm.exe. If you use another path then you have to change
it in Assembler.py. There is still possibility to use IDA assemble but that is
a bad idea.
In short, while in IDA just run once main.py form "File->Script file" or
"ALT+F7". Then you can use hotkey "ALT+O" to invoke optimizer by positioning
cursor at the beginning of interesting code and pressing hotkey.
There are still some differences between IDA assembly syntax and NASM syntax, so
sometimes you will be prompted to manually edit .asm file that is assembled with
NASM. If you run in such cases you can mail it to me and I'll fix it.