Javascript module/flow organizing.