Updates after feedback plus removed some unused functions