refactored how display wrapper is compiled