How to add more light and outlets in garage
Your drawing looks fine, as it is. However, the "up to code" section is tricky and more involved:

Your current existing wiring had to be up to code as it was at the time the house was built, and we assume it was. However, if you alter the circuit (add outlets, lights, etc.), the whole circuit has to be up to code as it is now. So all receptacles have to be GFCI protected, a certain minimum height from the floor, etc., etc. 

Without knowing more about your current wiring, and without knowing your local bylaws, it's impossible to tell if this change you're planning will be up to code or not.

There are also other things to consider, like maximum fill for a electrical box (if you're adding more wires to your light switch box, you might be in violation of the electrical code because of that).