Added simple main loop with signal handlers

This is for #46.


Also here, please on `stderr`.