More cleanup. Added automatic settlement creation for testing