Reduce memory usage of Heap Space and add autoincrement

Reduce memory usage of Heap Space … 	f89248e
merge from @Vertigo17 	553d94c
Add auto increment in Step number and Action number.