Fixed ToHTML extension method to always return hex
Got generation working.
Removed some unused code and optimized.