Edited program_state - minor changes + new handling of integer division