Renamed _id to id in the API.
Major DAO refactoring (WIP).