Changes based on @edenhill suggestions