Added database functionality and added packages. See smart.json for packages