js Unit model and controller