- Socket server now responses correctly to sigint.
- Abstracted socket server as a class rather than a single stored procedure.