Added -Wconversion flag
Fixed some minor issues