Linux comatability bugs fixed
Removed unnecessary helper functions
Comments added
conversion from pgm to bmp
printf checked