encapsulate navigation and library to classes
fix production bugs