Dates stuff

Added dates loading from DB. For now unique subjects per group only
allowed