Refactoring of MC stuff