introduce stat_block object to be used by current_stats
remove unused code and reformat some code