First stab at bookmarking support. Still a bit buggy.