Refactored mini ghost application for better data encapsulation