Cleaned up state management and config file. Fixed join syntax.