More work on habits class