Minor enhancements
Refactoring code and adding BF example code