Trying to get code back to working state