more refactoring and adding bookmarks