Added working API query that writes to the database
Cleaned up files comments in files