Add controller for VM detail table. Refactor code.