Code restructurized