A unified treatment of some basic problems in homotopy theory