Added data definition and helper function

I put some helper functions for some of the codes, it should works just the same. I also added more data definitions. We need to shorten it more and complete the data definitions tomorrow.