Noncommutative Geometry: A Functorial Approach