Added open first feature and minor clean up.