Some patterns for organising your JS code.