many style and some functional changes