Added a proper function to remove white spaces from source files