martix updates and overhaul of several files