Stabilized program

Fixed compilation errors
moved enum out of PS3Command class
Added JSON saving on exit