Fix main class config
Add unit tests