Extract common source code