Some refactors I noticed