Refactoring and adding rest api
git ingnore added
cleaned