[WIP] Added simple main loop with signal handlers

This is for #46.


Oops! That was only a workaround.. shouldn't be in here, you are right.