enable warnings and rearange boilerplate