hopefully fixed finalizers
Changed markup macros to work with actual code