Updated scripts to new database format
Added basic features to api