Initial commit.
Port common logic and best practices from LFE SPP project.