Soldier code with Storage bytecode optimizations

It's not done yet, but this part is functional and bug-free.