added possibility to have multiple service directories. added some environmen variables