Refactoring to make sure that we can execute in different classpath scenarios, and also offline.