Some potential code refinments.