1. add function to select paths based on some conditions;
2. add support to app usage to draw w.r.t. given paths;
3. some minor refactoring;