refactored display directive, added webapi backend