cleaning bookarks
some minor changes in functions, save hook: delete trailing spaces