Working on a little refatoring and removing unused code