Working API and some refactoring
Update package.json