Thank you so much KevinH for your reply.
Firstly, what is the difference between between the Kindle Format 8 Standalone version and the dual version ?
Secondly, is this KF8 format readable in the previous Kindle Devices ?
And Lastly does your code generate mobi file too?
If you are thinking to make your code open source and don't mind sharing it, then can you please provide me your code, so that i can have a look at.