fix most brakeman issues