updated database schema and greatly improved recording class