added preserve for instamarker, code cleanup