separate public/private functions, added @type
added tagbar snippet