dynamically adjust line weight and stroke; clean up code