modularize more code.

MSVC compilation fixes
make unit::display private and dynamically sized