Refactoring and integration with bacs::system.