Updated data model.
Clean up, save devices to database. Closes #3 and #4.