Rules 79-81 fixed & unused code removed