Using YAML as datastore & refactoring !
Move code to lib folder