There has been a great increase in recent years as to the amount of data from the grid that has been going to online systems. As more smart meters get installed into the AMI(advanced metering infrastructure), there is a need to mitigate the potential security threats in the collection system. There are a multitude of attack vectors that an adversary may take to compromise the confidentiality of user data and it may take much time and effort for developers to securely cover all such attack vectors. In this paper, we analyze the architecture of AMI systems and how data moves from one end to the other. In particular, we discuss the need for more research in safe program validation that protects against information leaks. Security problems can arise when programs do not perform as intended and may reveal confidential information or take unexpected actions. We discuss a theoretical network architecture that could take advantage of such secure program validation. The model minimizes attack vectors by containing data in one secure location that we call a DBPC(database processing center) instead of transporting data to multiple locations through a traditional DBMS(database management system). When outside parties want access to the data, they can send verified secure applications to the DBPC to run their applications remotely without direct access to the data. We describe the design of the AMI simulator and DBPC prototype module that we implemented.