Rev D done. Some library parts updated to suit new layout.