Refactored and ready for new mechanism