State saving for PIT and compile fixes
Merge pull request #11 from reenigne/master

State saving for PIT and compile fixes