Moved the width adjustment into separate function "fixate" and removed some variables that were unnecessary.