Added comments
Changed to use #attached
Added check_plain