code beautify
remove unused var
add fast random func, remove old generator
fix headers