Removed unecessary fork to get environment
Reduced garbage creation of strings
Replaced stringbuffers