make mesh building much more efficient
by not generating internal solid blocks unless needed

also fix some major bugs