Removed warnings and unused stuff