remove trailing white spaces and fix imports