I really should have commited before...

change DayMapping and histogram implementation and api.
added tests