Removed all warnings and commented code of unused functions.