Add header and minor modifications