FOUNDATIONS OF THE THEORY OF MAPS ON SURFACES WITH BOUNDARY