options and stats refactoring