shed separation of code and freed all memory
Add support for kill signals