renamed Inline.H to Common.H, moved sort tempate there, minor cleanups