code reordering and documentation of controllers