converted several shell calls into lua
lua cleanup
fixed minor warning message issues