General fixes; added lib dir and PSR-3 interface