Added service objects for persistence layer

Added the necessary service objects for the various entities. Started
writing tests.