Fixed a few reference left from the code I started from