Code refactor to MS naming conventions, LINQ optimization and manifest injection