Use bool instead of int
Use gnu_printf for format attribute (enables stuff like printing size_t).
Clear screen before first use.