Add namespace handling and PSR-3 compatibility