Examples level config fixed
A bunch of code refactored