cleaning warnings and removing unnecessary parameters