Some quick refactor