Improve template generation and file syncing.