removed compiler warning on cast from long to long
fixed warnings, changed compiler settings to display some more warnings