Fixes ~some~ of the code smell issues