Imported jsoup for configuration and fixed some state issues