Changes as per @gudmundur's suggestions