library reorganization and refactory
executable and more refactoring
cli working :)