Some refractoring & quality of life improvements.