An improvement.

linux friendliness and some more code