Refactoring Constellation base library to separate lib tools from app implementation.