Refactored stacked lib display code into a proper standalone library.