Refactored system.h