Part2 done with warnings
Moved declarations before statements to fix warnings
Added dmesg output to README