Making everything memory based and pass by pointer