Fix build errors and enable warnings by default