Factor to functions
fixed local vars
Added more parameters, finalize HVM building
Added example configs
remove partitioned mode
Fixed some instructions